package com.fc.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * <p>
 * 代码生成表
 * </p>
 *
 * @author 张非
 * @since 2023-07-20
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="SysTable对象", description="代码生成表")
public class SysTable implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "id")
    @Excel(name = "id", width = 15)
    private String id;

    @ApiModelProperty(value = "表名")
    @Excel(name = "表名", width = 15)
    private String tableName;

    @ApiModelProperty(value = "是否生成 1已生成 0未生成")
    @Excel(name = "是否生成 1已生成 0未生成", width = 15)
    private Integer isSync;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @Excel(name = "创建时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @ApiModelProperty(value = "表描述")
    @Excel(name = "表描述", width = 15)
    private String description;

    @TableField(exist = false)
    private List<SysPageSet> pageSets;

    public SysTable() {
    }

    public SysTable(String tableName, Integer isSync, String description) {
        this.tableName = tableName;
        this.isSync = isSync;
        this.description = description;
    }
}
